﻿using System;

namespace Core.Data
{
    /// <summary>
    /// 数据提供服务商抽象类
    /// </summary>
    public abstract class BaseDataProviderManager
    {
        /// <summary>
        /// 基础数据链接器
        /// </summary>
        /// <param name="settings">数据链接字符串</param>
        protected BaseDataProviderManager(DataSettings settings)
        {
            if (settings == null)
                throw new ArgumentNullException("settings");
            this.Settings = settings;
        }
        /// <summary>
        /// 数据连接字符串
        /// </summary>
        protected DataSettings Settings { get; private set; }
        /// <summary>
        /// 读取数据连接接口
        /// </summary>
        /// <returns></returns>
        public abstract IDataProvider LoadDataProvider();
    }
}
